/*
 * @Date: 2023-01-22 03:27:45
 * @LastEditors: 恶名扬 2080156129@qq.com
 * @LastEditTime: 2023-01-24 05:13:40
 * @FilePath: \campus-repair-platform\server\common\sql_sentences\maintenance_record.js
 */
/**
 * idSelect     根据报修单id获取维修记录信息
 * insert 添加维修记录
 * idUpdate     根据报修单Id修改维修记录信息
 */

const util = require("../util")
const table = "maintenance_record"
const str = "job_number, p_name, remark, ctime"

exports.select = (data) => util.select(str, table, typeof (data) == "string" ? data : util.selectTransition(data), 'ctime desc')

exports.insert = (data) =>
  util.insert(table, util.insertStr(data), util.insertTransition(data))

exports.idUpdate = (data, id) =>
  util.idUpdate(table, util.updateTransition(data), id)

exports.idSelect = (id) =>
  util.idSelect(str, table, id)
